package com.molin.DateTest.jdk8DateTest;

import java.time.LocalDateTime;

public class Demo6 {
    public static void main(String[] args) {
        LocalDateTime localDateTime=LocalDateTime.of(2020,11,11,11,11,11);
        LocalDateTime newLocalDateTime=localDateTime.plusYears(1);
        System.out.println(newLocalDateTime);
        LocalDateTime oldLdt=localDateTime.plusYears(-1);
        System.out.println(oldLdt);

        LocalDateTime withLDT=localDateTime.withYear(2048);
        System.out.println(withLDT);



    }
}
